import request from "@/api/index";

const register = ({ username, password, email, emailCode }) => {
  return request({
    url: "/register/email",
    method: "post",
    data: {
      username,
      password,
      email,
      emailCode,
    },
  });
};

const captchaEmail = ({ email }) => {
  return request({
    url: `/captchaEmail?email=${email}`,
    method: "get",
  });
};

export { captchaEmail, register };
